package com.cloud.cop.response;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;

import com.cloud.cop.CopResponse;
/**
 * 通用返回对象
 * @author mayh
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name="response")
public class CommonCopResponse implements CopResponse {

	@XmlAttribute
	private boolean successful = true;
	
	public static final CommonCopResponse SUCCESS_RESPONSE = new CommonCopResponse(true);
	public static final CommonCopResponse FAILURE_RESPONSE = new CommonCopResponse(false);
	
	public CommonCopResponse(boolean successful){
		this.successful = successful;
	}
	
	public boolean isSuccessful(){
		return this.successful;
	}
	
	
}
